<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>IM Agency Home</title>
<meta name="keywords" content="" />
<meta name="description" content="" />
<link href='http://fonts.googleapis.com/css?family=Open+Sans+Condensed:300' rel='stylesheet' type='text/css'>
<?php 
	foreach($arr_cssSriptUrls as $s_cssSriptUrl){
		?> 
			<link rel="stylesheet" href="<?php echo fw_util_getAbsoluteUrl().$s_cssSriptUrl;?>" type="text/css" media="screen" />		
		<?php 
	}
	
	foreach($arr_jsScriptUrls as $s_jsScriptUrl){
		?>
			<script type="text/javascript" src="<?php echo fw_util_getAbsoluteUrl().$s_jsScriptUrl;?>" ></script>
		<?php 
	}
?>

<script type="text/javascript">
function slideSwitch() {
    var $active = $('#home-slideshow IMG.active');

    if ( $active.length == 0 ) $active = $('#home-slideshow IMG:last');

    // use this to pull the images in the order they appear in the markup
    var $next =  $active.next().length ? $active.next()
        : $('#home-slideshow IMG:first');

    // uncomment the 3 lines below to pull the images in random order
    
    //var $sibs  = $active.siblings();
    //var rndNum = Math.floor(Math.random() * $sibs.length );
    //var $next  = $( $sibs[ rndNum ] );


    $active.addClass('last-active');

    $next.css({opacity: 0.0})
        .addClass('active')
        .animate({opacity: 1.0}, 3000, function() {
            $active.removeClass('active last-active');
        });
}

$(function() {
    setInterval( "slideSwitch()", 5000 );
});

</script>
</head>
<body>
<div class="wrapper">
	<?php include C_FW_customPackage.'views/generic-page-parts/body-header.php';?>
	<div id="home-slideshow-cont">
		<div id="home-slideshow">
			<?php 
			//loop through the images
	   				for($i=0;$i<count($arr_slideShowImages);$i++){
	   					$s_slideShowImageUrl = $arr_slideShowImages[$i];
	   					if($i == 0){
	   						echo '<img src="' . $s_slideShowImageUrl . '" class="active" />';
	   					}else{
	   						echo '<img src="' . $s_slideShowImageUrl . '" />';
	   					} 
	   				}
	   			?>
	   	</div>
   		<div class="covering"></div>
	</div>
   		
   	<div class="push"></div>
</div>
<?php include C_FW_customPackage.'views/generic-page-parts/body-footer.php';?>
</body>
</html>
